package com.fuqiang.nightshopumsmodel.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @Description:后台菜单表
 * @author fuqiang
 * @since 2020-04-14
 */
@ApiModel(value ="后台菜单表")
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("ums_menu")
public class UmsMenu implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    @ApiModelProperty(value = "父级ID")
    @TableField("parent_id")
    private Long parentId;
    @ApiModelProperty(value = "创建时间")
    @TableField("create_time")
    private LocalDateTime createTime;
    @NotEmpty(message = "菜单名称不能为空")
    @ApiModelProperty(value = "菜单名称")
    @TableField("title")
    private String title;
    @ApiModelProperty(value = "菜单级数")
    @TableField("level")
    private Integer level;
    @ApiModelProperty(value = "菜单排序")
    @TableField("sort")
    private Integer sort;
    @ApiModelProperty(value = "前端名称")
    @TableField("name")
    @NotEmpty(message = "菜单名称不能为空")
    private String name;
    @ApiModelProperty(value = "前端图标")
    @TableField("icon")
    @NotEmpty(message = "菜单名称不能为空")
    private String icon;
    @ApiModelProperty(value = "前端隐藏")
    @TableField("hidden")
    private Integer hidden;


    public static final String ID = "id";

    public static final String PARENT_ID = "parent_id";

    public static final String CREATE_TIME = "create_time";

    public static final String TITLE = "title";

    public static final String LEVEL = "level";

    public static final String SORT = "sort";

    public static final String NAME = "name";

    public static final String ICON = "icon";

    public static final String HIDDEN = "hidden";

}
